from info import models
from info import create_app, db
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from config import DevelopementConfig, ProductionConfig

app = create_app(DevelopementConfig)

# 创建manager
manager = Manager(app)

# 创建迁移对象
Migrate(app, db)

# 给Migrate绑定迁移命令
manager.add_command('db', MigrateCommand)

if __name__ == '__main__':
    manager.run()
